package pack.model;
import com.badlogic.gdx.Gdx;

/**
 *  Uses libgdx to create a soundclass that handle the sound effects.
 * There is a need to call the dispose method if the sound is not to be reused because its not 
 * a part of the garbage collect.
 * @author Henrik Larsson
 */
public class McSound {

	/**
	 * @uml.property  name="hammerSound"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	private com.badlogic.gdx.audio.Sound hammerSound;

	public McSound()
	{
		hammerSound = Gdx.audio.newSound(Gdx.files.internal("data/HammerTime.mp3"));
	}
	
	public void playHammerSound()
	{
		hammerSound.play(1.0f); 
		
	}
	public void playHammerSound(float volume)
	{
		hammerSound.play(volume); 
	}
	
	public void dispose(){
		hammerSound.dispose();
	}
}